package com.park.service.impl.resource;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.resource.ResourceCollectionModel;
import com.park.client.service.resource.ResourceCollectionService;
import com.park.dao.resource.ResourceCollectionMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("resourceCollectionService")
public class ResourceCollectionServiceImpl extends BaseServiceImpl<ResourceCollectionModel> implements ResourceCollectionService {
	
	@Autowired
	private ResourceCollectionMapper resourceCollectionMapper;

	@Override
	public boolean insertSelective(ResourceCollectionModel record) {
		return resourceCollectionMapper.insertSelective(record)==1;
	}

	@Override
	public ResourceCollectionModel selectByObject(ResourceCollectionModel record) {
		return resourceCollectionMapper.selectByObject(record);
	}

	@Override
	public List<ResourceCollectionModel> selectByUserId(Long userId) {
		return resourceCollectionMapper.selectByUserId(userId);
	}

	@Override
	public boolean cancelResource(ResourceCollectionModel record) {
		return resourceCollectionMapper.cancelResource(record)==1;
	}

}
